StupidBeauty
Read times:962Posted at:Sat Mar 15 03:22:55 2014
- no title specified

Lucene4.0.0开发文档翻译:类BoostingQuery,Class BoostingQuery

  • BoostingQuery类可用来有效地对于匹配某个指定查询的结果进行降权(demote)。与"NOT"语句不同的是,这种查询仍然会命中包含有不希望出现的单词的文档,但是,会降低那种文档的得分:Query balancedQuery = new BoostingQuery(positiveQuery, negativeQuery, 0.01f); 在这种情况下,positiveQuery包含着占主导地位的、我们希望满足的搜索条件,它被用于选中所有相匹配的文档,而negativeQuery呢,其中包含着我们不希望其出现的元素,它们会导致得分降低。对于那些匹配了negativeQuery的文档,它们的得分会与"boost"参数相乘,因此,该参数应当小于1,以达到一种降权效果。此代码最初是在此处发布的: http://marc.theaimsgroup.com/?l=lucene-user&m=108058407130459&w=2 ,其文档在这里: http://wiki.apache.org/lucene-java/CommunityContributions

未知美人

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands